﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EggOfPanKu.Library.Settings;

namespace EggOfPanKu.Library.Infrastructure
{
	public static class ConfigManager
	{
		private static AppSettings _appSettingsMgr;
		private static EggUserSettings _userSettingsMgr;

		/// <summary>
		/// Gets the static app settings manager.
		/// </summary>
		/// <value>The app settings MGR.</value>
		public static AppSettings AppSettingsMgr
		{
			get
			{
				if (_appSettingsMgr == null)
				{
					_appSettingsMgr = AppSettings.LoadConfigSection<AppSettings>();
				}
				return _appSettingsMgr;
			}
		}


		/// <summary>
		/// Gets the static user settings manager.
		/// </summary>
		/// <value>The user settings MGR.</value>
		public static EggUserSettings UserSettingsMgr
		{
			get
			{
				if (_userSettingsMgr == null)
				{
					_userSettingsMgr = EggUserSettings.LoadConfigSection<EggUserSettings>();
				}
				return _userSettingsMgr;
			}
		}
	}
}
